package com.zhouxiaoge.观察者模式;

/**
 * @author 周小哥
 * @Create 2020年03月17日 20:35
 * @email gqzmy@163.com
 */

public class ObserverMain {

    public static void main(String[] args) {
        F_ObserverImpl f_observer = new F_ObserverImpl();
        T_ObserverImpl t_observer = new T_ObserverImpl();
        S_ObserverImpl s_observer = new S_ObserverImpl();

        Subject subject = new Subject();
        subject.addAttach(f_observer);
        subject.addAttach(t_observer);
        subject.addAttach(s_observer);
        subject.setMsg("现在改变");
    }

}
